package com.then.libary.thread;

import java.util.List;
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class ThreadExecutorPool {
	static ConcurrentLinkedQueue<Runnable> concurrentLinkedQueue = new ConcurrentLinkedQueue<Runnable>();
	static ExecutorService executorService;
	static {
		executorService = Executors.newCachedThreadPool();
	}
	public static void executeThread(Runnable...threads)
	{
		for(Runnable th:threads)
			executorService.execute(th);
	}
	public static List<Runnable> closeAllThread()
	{
		
		return executorService.shutdownNow();
	}
    
	public static void addFirstExecuteThread()
	{
		
	}

}
